<div class="form">
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'systemmenu_form-form',
        'enableClientValidation' => true,
    ));
    ?>
    <table style="width: 100%">
        <tr>
            <td class="label required"><?php echo $form->labelEx($model, 'name'); ?></td>
            <td class="input" >
                <?php echo $form->textField($model, 'name', array('style' => 'width:230px')); ?>
                <?php echo $form->error($model, 'name'); ?>
            </td>
        </tr>
        <tr>
            <td class="label"><?php echo $form->labelEx($model, 'link'); ?></td>
            <td class="input" >
                <?php echo $form->textField($model, 'link', array('style' => 'width:230px')); ?>
                
            </td>
        </tr>
        <tr>
            <td class="label"><?php echo $form->labelEx($model, 'parent'); ?></td>
            <td class="input">
                <?php echo $form->dropDownList($model, 'parent_id', array('' => t('MSG_NO_PARENT', 'messages')) + SystemMenu::model()->getListData($model->id)); ?>
            </td>
        </tr>
         <tr>
            <td class="label required"><?php echo $form->labelEx($model, 'status'); ?></td>
            <td class="input">
                <?php echo $form->dropDownList($model,'status' , SystemMenu::model()->getStatus(), array('empty' => t('MSG_FIRST_STATUS', 'messages'))); ?>
                <?php echo $form->error($model, 'status'); ?>
            </td>
         </tr>
         <tr>
            <td class="label"><?php echo $form->labelEx($model, 'Authorization'); ?></td>
            <td class="input">
                <?php
                $criteria = new CDbCriteria();
                $criteria->condition = "type=:type";
                $criteria->order = "name";
                $criteria->params = array(":type" => AuthorizationType::TASK);
                echo $form->dropDownList($model, 'auth_item_id', Html::listData(AuthItem::model()->findAll($criteria), 'id', 'name'), array('empty' => t('MSG_FIRST_ITEM_TASK', 'messages'))); ?>
            </td>
        </tr>
        <tr>
            <td class="label"><?php echo $form->labelEx($model, 'description'); ?></td>
            <td class="input" >
                <?php echo $form->textArea($model, 'description', array('style' => 'width:230px','maxlength'=>200,'rows' => 5)); ?>
            </td>
        </tr>
         <tr>
            <td colspan="2" class="cbutton">
                <?php echo Html::buttonConfirm(t('BTN_SAVE'),'statusConfirmed'); ?>
                <?php echo Html::buttonConfirm(t('BTN_CANCEL'),'statusCanceled', 'cancel'); ?>
            </td>
         </tr>
    </table>
    <?php $this->endWidget(); ?>
    <script type="text/javascript">
        LGCMS.addTooltip();
    </script>
</div>

